function y = e_wood(x)
% Extended Wood Function  
%x0=[-3,-1,-3,-1,...].  
%fmin=n/2
%Author:shi yangyang
%n=200;
n=length(x);
m=n/4;
y=ones(1,m);
for i=1:1:m
    y(i)=100.0*(x(4*i-3)^2-x(4*i-2))^2+(x(4*i-3)-1.0)^2+90.0*(x(4*i-1)^2-x(4*i))^2+(1.0-x(4*i-1))^2.....
     +10.10*(x(4*i-2)-1.0)^2+10.10*(x(4*i)-1.0)^2+19.80*(x(4*i-2)-1.0)*(x(4*i)-1.0);
end
y=sum(y);